As a MEMS device, there is known a movable diffraction grating including a support portion, a movable portion swingably connected to the support portion, a driving portion driving the movable portion, and a metal film formed on the movable portion and provided with a diffraction grating pattern (for example, see Japanese Patent No. 5351729). In such a movable diffraction grating, for example, the movable portion is swung at a high speed at a resonance frequency level.